

/* Includes ------------------------------------------------------------------*/
#include  "stm32f0xx.h"
#include  "bsp_systick.h"
#include  "bsp_gpio_output.h"
#include	"bsp_iwdg.h"
#include  "bsp_duty_TIM.h"
#include  "bsp_exti.h"
#include "bsp_A_phase_tim.h"
#include "bsp_B_phase_tim.h"
#include "bsp_C_phase_tim.h"
#include "bsp_A_phase_zero_point_tim.h"
#include "bsp_B_phase_zero_point_tim.h"
#include "bsp_C_phase_zero_point_tim.h"
#include "bsp_key.h"
#include "bsp_led.h"
#include "bsp_stm32flash.h"
#include "bsp_usart.h"
/**
  * @brief  Main program.
  * @param  None
  * @retval None
  */
int main(void)
{
    USART_Config();
    OUTPUT_GPIO_Config();   
    SysTick_Init();
    DUTY_TIM_Init();        //初始化PWM输入捕获用定时器1
    IWDG_Config(IWDG_Prescaler_64,625);  //配置看门狗1s
    Indicator_Pin_Config();
    EXTI_ABC_Phase_Config();
    A_Phase_Zero_Point_Tim_Config();
    B_Phase_Zero_Point_Tim_Config();
    C_Phase_Zero_Point_Tim_Config();
    Phase_A_Tim_Configuration();
    Phase_B_Tim_Configuration();
    Phase_C_Tim_Configuration();
    KEY_Init();
    LED_GPIO_Config();
    Read_Param();
    while(1)
    {
      OUTPUT_Control(IC1Value,IC2Value);
      TIM_Cmd(DUTY_TIM,ENABLE);
      Key_Driver();
      IWDG_Feed();  //喂狗
    }
}




/**
  * @}
  */

/**
  * @}
  */

/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
